package com.apimarket.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description:
 * @Author ZXR
 * @Date 2021/7/12 10:19
 * @Version 1.0
 */

@Data
@Table(name = "dataset")
public class Dataset {
    private String id;
    @NotNull
    private Integer type;
    @Column(name="pic_url")
    private String picUrl;
    @NotNull
    private String name;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;
    @NotNull
    private Double price;
    @NotNull
    @Column(name="field_description")
    private String fieldDescription; //json字符串
    @NotNull
    private String description;
    @Column(name="example_url")
    private String exampleUrl;
    @Column(name="download_num")
    private Integer downloadNum;
    private String path;//注意这个path是带/的
}
